package com.demo.minicat;

/**
 * @author: lipan
 * @date: 2021/10/1 11:02
 */

public class BizServlet extends HttpServlet {


    @Override
    void doGet(Request request, Response response) {


        try {
            Thread.sleep(10000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        String respContent="<h1>do get success</h1>";
        try {
            response.outPut(HttpUtils.getHeader(HttpStatus.OK)+respContent);

        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Override
    void doPost(Request request, Response response) {
        String respContent="<h1>do post success</h1>";
        try {
            response.outPut(HttpUtils.getHeader(HttpStatus.OK)+respContent);

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
